package com.smart.alipay.controller;

import com.smart.alipay.service.AliPayService;
import com.smart.common.vo.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

@RestController
public class AliPayController {
    @Resource
    AliPayService aliPayService;

    @PostMapping("/ali/pay")
    public ResponseResult<String> aliPay(String subject, String orderSn, BigDecimal total) throws Exception {
        return aliPayService.pay(subject, orderSn, total);
    }

}
